package excercise;

public class EX01_Q30 {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		System.out.println( "                            Multiplication Table" );
		System.out.println( "           1       2       3       4       5       6       7       8       9" );
		System.out.println( "----------------------------------------------------------------------------" );
		
		
		
		for ( int i = 1; i <= 9; ++i ){
			System.out.print( i + "  |" );
				
			for ( int a = 1; a <= 9; ++a ){
				if ( i * a >= 10 ){
					System.out.print( "      " + ( i * a ) );
				}
				else {
					System.out.print( "       " + ( i * a ) );
				}
				
			}
			
			System.out.println("");
		}
	  
		/*
		for ( int i = 1; i <= 9; ++i ){
			if ( i ==1 ) System.out.print( ( i * 1) + "  |" );
			System.out.print( "       " + ( i * 1) );
		}
		System.out.println( "" );
		
		for ( int i = 1; i <= 9; ++i ){
			if ( i ==1 ) System.out.print( ( i * 2) + "  |" );
			System.out.print( "       " + ( i * 2) );
		}
		System.out.println( "" );

		for ( int i = 1; i <= 9; ++i ){
			if ( i ==1 ) System.out.print( ( i * 2) + "  |" );
			System.out.print( "       " + ( i * 2) );
		}
		System.out.println( "" );
		
		for ( int i = 1; i <= 9; ++i ){
			if ( i ==1 ) System.out.print( ( i * 3) + "  |" );
			System.out.print( "       " + ( i * 3) );
		}
		System.out.println( "" );

		for ( int i = 1; i <= 9; ++i ){
			if ( i ==1 ) System.out.print( ( i * 4) + "  |" );
			System.out.print( "       " + ( i * 4) );
		}
		System.out.println( "" );

		for ( int i = 1; i <= 9; ++i ){
			if ( i ==1 ) System.out.print( ( i * 5) + "  |" );
			System.out.print( "       " + ( i * 5) );
		}
		System.out.println( "" );

		for ( int i = 1; i <= 9; ++i ){
			if ( i ==1 ) System.out.print( ( i * 6) + "  |" );
			System.out.print( "       " + ( i * 6) );
		}
		System.out.println( "" );

		for ( int i = 1; i <= 9; ++i ){
			if ( i ==1 ) System.out.print( ( i * 7 ) + "  |" );
			System.out.print( "       " + ( i * 7 ) );
		}
		System.out.println( "" );
		
		for ( int i = 1; i <= 9; ++i ){
			if ( i ==1 ) System.out.print( ( i * 8) + "  |" );
			System.out.print( "       " + ( i * 8) );
		}
		System.out.println( "" );

		for ( int i = 1; i <= 9; ++i ){
			if ( i ==1 ) System.out.print( ( i * 9) + "  |" );
			System.out.print( "       " + ( i * 9) );
		}
		System.out.println( "" );

	*/
	
	
	
	
	}
	

}
